home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
bigtol1g
/
form1.frm
next >
Wrap
Text File
|
1999-08-22
|
3KB
|
97 lines
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "Note Pad"
ClientHeight = 3195
ClientLeft = 165
ClientTop = 735
ClientWidth = 4920
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4920
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text1
Appearance = 0 'Flat
BeginProperty Font
Name = "Courier New"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1935
Left = 240
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Text = "Form1.frx":0000
Top = 480
Width = 2775
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3480
Top = 360
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.txt"
FilterIndex = 1
End
Begin VB.Menu mnuFile
Caption = "File"
Begin VB.Menu mnuNew
Caption = "New"
End
Begin VB.Menu mnuOpen
Caption = "Open"
End
Begin VB.Menu mnuSave
Caption = "Save"
End
Begin VB.Menu mnuExit
Caption = "Exit"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim fso As FileSystemObject
Dim fs As TextStream
Private Sub Form_Load()
Set fso = CreateObject("Scripting.FileSystemObject")
End Sub
Private Sub Form_Resize()
If Me.WindowState = vbMinimized Then Exit Sub
Text1.Left = 50
Text1.Top = 50
Text1.Width = Form1.Width - 200
Text1.Height = Form1.Height - 770
End Sub
Private Sub mnuExit_Click()
End
End Sub
Private Sub mnuNew_Click()
Text1.Text = ""
End Sub
Private Sub mnuOpen_Click()
CommonDialog1.ShowOpen
Set fs = fso.OpenTextFile(CommonDialog1.FileName, ForReading)
Text1.Text = fs.ReadAll
End Sub
Private Sub mnuSave_Click()
CommonDialog1.ShowSave
Set fs = fso.CreateTextFile(CommonDialog1.FileName, ForWriting)
fs.Write Text1.Text
End Sub